#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

char* my_strstr(const char* str1, const char* str2)
{
	char* s1 = NULL;
	char* s2 = NULL;
	char* cur = str1;

	if (*str2 == '\0')
		return cur;
	while (*cur)
	{
		s1 = cur;
		s2 = str2;
		while (*s1!='\0'&&*s2!='\0'&& * s1 == *s2)
		{
			s1++;
			s2++;
		}
if (*s2 == '\0')
				return cur;
		cur++;
	}
	return NULL;
}

int main()
{
	char arr[] = "absdwqqw";
	char brr[] = "sd";
	char* ret = my_strstr(arr, brr);
	printf("%s", ret);
	return 0;
}